/// ****************************************************************************
/// Author:	        Robin Zhu
/// Create Date:	2011-11-1
/// Purpose: 		数据访问上下文设置节定义类文件
/// ****************************************************************************
/// Modify By		Date			Remark
/// ****************************************************************************

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Configuration;

namespace RB.DataAccess.Configuration
{
    /// <summary>
    /// 数据访问上下文设置节定义类
    /// </summary>
    public class DataAccessConfigSection : ConfigurationSection
    {
        public DataAccessConfigSection()
        {
        }

        [ConfigurationProperty("contexts")]
        public DataContextConfigCollection Contexts 
        {
            get
            {
                if (!this.Properties.Contains("contexts"))
                {
                    this["contexts"] = new DataContextConfigCollection();
                }
                return (DataContextConfigCollection)this["contexts"];
            }
        }

        [ConfigurationProperty("defaultContext", DefaultValue = "defaultContext")]
        public string DefaultContext
        {
            get
            {
                return (string)this["defaultContext"];
            }
            set
            {
                this["defaultContext"] = value;
            }
        }
    }
}
